<template>
	<view class="main">
		<view class="title">当前账号数据权限:{{deptList.name || ''}}</view>
		<ul class="ulSelection">			
			<li @click="goIsRenew(allTotalList.type,allTotalList.value,allTotalList.label)">
				<view class="part1">{{allTotalList.label}}</view>
				<view class="part2">{{allTotalList.value}}</view>
				<view class="part3">{{allTotalList.tip}}</view>
			</li>
			<li @click="goIsRenew(aryUpdateList.type,aryUpdateList.value,aryUpdateList.label)">
				<view class="part1">{{aryUpdateList.label}}</view>
				<view class="part2">{{aryUpdateList.value}}</view>
				<view class="part3">{{aryUpdateList.tip}}</view>
			</li>
			<li @click="goIsRenew(notUpdateList.type,notUpdateList.value,notUpdateList.label)">
				<view class="part1">{{notUpdateList.label}}</view>
				<view class="part2">{{notUpdateList.value}}</view>
				<view class="part3">{{notUpdateList.tip}}</view>
			</li>
			<li @click="goIsRenew(todayUpdateList.type,todayUpdateList.value,todayUpdateList.label)">
				<view class="part1">{{todayUpdateList.label}}</view>
				<view class="part2">{{todayUpdateList.value}}</view>
				<view class="part3">{{todayUpdateList.tip}}</view>
			</li>
			
			
			<li @click="goIsRenew(allTotalList1.type,allTotalList1.value,allTotalList1.label)">
				<view class="part1">{{allTotalList1.label}}</view>
				<view class="part2">{{allTotalList1.value}}</view>
				<view class="part3">{{allTotalList1.tip}}</view>
			</li>
			<li @click="goIsRenew(aryUpdateList1.type,aryUpdateList1.value,aryUpdateList1.label)">
				<view class="part1">{{aryUpdateList1.label}}</view>
				<view class="part2">{{aryUpdateList1.value}}</view>
				<view class="part3">{{aryUpdateList1.tip}}</view>
			</li>
			<li @click="goIsRenew(notUpdateList1.type,notUpdateList1.value,notUpdateList1.label)">
				<view class="part1">{{notUpdateList1.label}}</view>
				<view class="part2">{{notUpdateList1.value}}</view>
				<view class="part3">{{notUpdateList1.tip}}</view>
			</li>
			<li @click="goIsRenew(todayUpdateList1.type,todayUpdateList1.value,todayUpdateList1.label)">
				<view class="part1">{{todayUpdateList1.label}}</view>
				<view class="part2">{{todayUpdateList1.value}}</view>
				<view class="part3">{{todayUpdateList1.tip}}</view>
			</li>
		</ul>
	</view>
</template>

<script>
	import api from "../../api/routes.js";
	export default{
		data(){
			return{
				allTotalList:[],
				allTotalList1:[],
				aryUpdateList:[],
				aryUpdateList1:[],
				notUpdateList:[],
				notUpdateList1:[],
				todayUpdateList:[],
				todayUpdateList1:[],
				
				deptList:[],
			}
		},
		
	 	async onLoad() {
			const res =await this.$myRequest({
				url: api.UpdateStatistics,
				method: "GET",
				data: {	},
			});
			this.allTotalList=res.data.allTotal;
			this.allTotalList1=res.data.allTotal1;
			this.aryUpdateList=res.data.aryUpdate;
			this.aryUpdateList1=res.data.aryUpdate1;
			this.notUpdateList=res.data.notUpdate;
			this.notUpdateList1=res.data.notUpdate1;
			this.todayUpdateList=res.data.todayUpdate;
			this.todayUpdateList1=res.data.todayUpdate1;
			this.deptList=res.data.data.currDept;
			console.log(res.data,'数据更新');
		},
			
		methods:{
			goIsRenew(index,total,label){
				uni.navigateTo({
				    url: "/pages/humanSociety/isRenew?index="+index+"&allTotal="+total+"&label="+label,
				});
				console.log(index,'index');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		padding: 10px;
		// background: #EEF6FC;
		background: #f4f4f4;
		height: 100vh;
	}
	.title{
		font-size: 18px;
		font-weight: bold;
		height: 40px;
		line-height: 40px;
		text-align: center;
	}
	.ulSelection{
			display: flex;
			justify-content:space-between;
			flex-wrap: wrap;
			margin-top: 8px;
		li{
			height: 120px;
			width: 49%;
			// border: 1px solid green;
			margin-bottom: 8px;
			background: #fff;
			padding: 8px;
			.part1{
				font-size: 16px;
			}
			.part2{
				font-size: 22px;
				font-weight: bold;
				line-height: 62px;
			}
			.part3{
				font-size: 14px;
				color: #9A9A9A;
			}
		}
		
	}
</style>